import threading


class BaseThread(threading.Thread):
    def __init__(self, name):
        super(BaseThread, self).__init__()
        self.alive = False
        self.name = name

    def start(self):
        self.alive = True
        super(BaseThread, self).start()

    def stop(self):
        self.alive = False
        super(BaseThread, self).join()

    def run(self):
        print("Thread %s is running..." % self.name)
        self.runnable()
        print("Thread %s is exited..." % self.name)

    def runnable(self):
        pass
